{% extends 'xadmin/base.html' %}

{% block title %}
    站点管理
{% endblock %}

{% block main %}
    <form method="POST" class="form-horizontal" action="" enctype="multipart/form-data">
        {% csrf_token %}
        {% for field in site_form %}
            {% if not forloop.first %}
                <div class="hr-line-dashed"></div>
            {% endif %}
            <div class="form-group">
                <label class="col-sm-2 control-label">{{ field.label }}</label>
                <div class="col-sm-10">
                    {{ field }}
                    <span class="help-block m-b-none">{{ field.errors }}</span>
                </div>
            </div>
        {% endfor %}
        <div class="col-sm-4 col-sm-offset-2">
            <button class="btn btn-primary" type="submit">保存内容</button>
            <a class="btn btn-white" href="{% url 'sitelist' %}" onclick="javascript:history.back(-1);">取消</a>
        </div>
    </form>
{% endblock %}